import request from '@/utils/request'

// 获取部门列表
export function getdepartment() {
  return request({
    url: '/company/department',
    method: 'get'
  })
}

// 添加部门
export function adddepartment(data) {
  return request({
    url: '/company/department',
    method: 'post',
    data
  })
}

// 修改部门
export function updatedepartment(data) {
  return request({
    url: `/company/department/${data.id}`,
    method: 'put',
    data
  })
}

// 获取详细信息
export function adddepartmentList(id) {
  return request({
    url: `/company/department/${id}`,
    method: 'get'
  })
}

// 删除部门信息
export function deldepartmentList(id) {
  return request({
    url: `/company/department/${id}`,
    method: 'delete'
  })
}
